/*
 * VisionManager.cpp
 *
 *  Created on: May 16, 2010
 *      Author: Soheil Damangir
 */

#include <string>
#include "VisionManager.h"

using namespace std;
namespace Group5 {

VisionManager::VisionManager() :
  cam_reader(Conf::get().read<string> ("CameraIP"), &jpeg_buffers,
      &jpeg_queue),
  processor(&jpeg_queue, &vision_process){
  cam_reader.Start();
  processor.Start();
}



DetectionResults const & VisionManager::getBallResult()
{
  return vision_process.getBallResult();
}

DetectionResults const & VisionManager::getBombResult()
{
  return vision_process.getBombResult();
}

DetectionResults const & VisionManager::getStripeResult()
{
  return vision_process.getStripeResult();
}

VisionManager::~VisionManager() {
  cam_reader.SignalStop();
  processor.SignalStop();
}

}
